package com.xiaoyu.izf.model;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "app_send_msg_code", schema = "izf", catalog = "")
public class AppSendMsgCode {
    private String appCid;
    private String msgCode;
    private Timestamp insertTime;
    private String checkCode;
    private Timestamp sendTime;

    @Id
    @Column(name = "app_cid")
    public String getAppCid() {
        return appCid;
    }

    public void setAppCid(String appCid) {
        this.appCid = appCid;
    }

    @Basic
    @Column(name = "msg_code")
    public String getMsgCode() {
        return msgCode;
    }

    public void setMsgCode(String msgCode) {
        this.msgCode = msgCode;
    }

    @Basic
    @Column(name = "insert_time")
    public Timestamp getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Timestamp insertTime) {
        this.insertTime = insertTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AppSendMsgCode that = (AppSendMsgCode) o;
        return Objects.equals(appCid, that.appCid) &&
                Objects.equals(msgCode, that.msgCode) &&
                Objects.equals(insertTime, that.insertTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(appCid, msgCode, insertTime);
    }

    @Basic
    @Column(name = "check_code")
    public String getCheckCode() {
        return checkCode;
    }

    public void setCheckCode(String checkCode) {
        this.checkCode = checkCode;
    }

    @Basic
    @Column(name = "send_time")
    public Timestamp getSendTime() {
        return sendTime;
    }

    public void setSendTime(Timestamp sendTime) {
        this.sendTime = sendTime;
    }
}
